package com.fire.eyes.config;

import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author wangjian_b
 * @date 2018/4/26 19:59
 * @describe
 */
@Configuration
@MapperScan(basePackages = {"com.fire.*.dao"})
public class MybatisPlusConfig {

	/**
	 * mybatis-plus分页插件
	 * 文档：http://mp.baomidou.com
	 * @return
	 */
	@Bean
	public PaginationInterceptor paginationInterceptor() {
		PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
		paginationInterceptor.setDialectType("mysql");
		return paginationInterceptor;
	}
}
